package cn.dmp.utils

import com.typesafe.config.ConfigFactory
import redis.clients.jedis.{Jedis, JedisPool}

object JedisPools {

    private val config = ConfigFactory.load()
    private val redisHost = config.getString("rhost")
    private val redisPort = config.getInt("rport")

    private lazy val jedisPool = new JedisPool(redisHost, redisPort)

    def getJedis: Jedis = jedisPool.getResource


}
